package com.sale.goods.mapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sale.common.mybatis.core.mapper.BaseMapperPlus;
import com.sale.goods.domain.GoodsCancel;
import com.sale.goods.domain.GoodsCollection;
import com.sale.goods.domain.GoodsNuclearPre;
import com.sale.goods.domain.dto.GoodsCollectionDto;
import com.sale.goods.domain.vo.GoodsCollectionVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @Description 收款单
 * @Date 23-07-20
 * @Author hl
 **/
public interface GoodsCollectionMapper extends BaseMapperPlus<GoodsCollectionMapper, GoodsCollection, GoodsCollection> {

    /**
     * 收款单查询列表 分页
     * @param build,buildQueryWrapper
     * @return   List<GoodsCollectionDto>
     */
    Page<Map<String,String>> selectCollectionList(@Param("page")  Page<GoodsCollectionVo> build, @Param(Constants.WRAPPER) Wrapper<GoodsCollectionVo> buildQueryWrapper);

    /**
     * 测试
     */
    Page<Map<String, Object>> selectCes(@Param("code") String code,@Param("page") Page<GoodsCollectionVo> build,@Param(Constants.WRAPPER) Wrapper<GoodsCollectionVo> buildQueryWrapper);

    /**
     * 工作台接口(销售已收款金额)
     */
    String goodsReceived();

    /**
     * 工作台接口(客户欠款金额)
     */
    String goodsArrears();

    /**
     * 结账反结账（财务模块单据查询）
     */
    List<GoodsCollectionDto> getQClosingDocument(String time);

    /**
     * 结账反结账（财务模块单据查询）
     */
    List<GoodsCollectionDto> getRClosingDocument(String time);

    /**
     * 更新核销数据(收款单)
     */
    boolean renewalAndCancellation(GoodsCancel cancel);
}
